<!--
 * @Author: YuHao
 * @Date: 2022-04-14 10:33:14
 * @LastEditTime: 2022-04-14 13:27:40
 * @LastEditors: YuHao
 * @Description: 
 * @FilePath: \vben-admin\src\components\Table\src\components\settings\RedoSetting.vue
 * Copyright (c) 2022 by 弗斯特机电设备有限公司, All Rights Reserved. 
-->
<template>
  <Tooltip placement="top">
    <template #title>
      <span>{{ '刷新' }}</span>
    </template>
    <RedoOutlined @click="redo" />
  </Tooltip>
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { Tooltip } from 'ant-design-vue';
  import { RedoOutlined } from '@ant-design/icons-vue';
  import { useTableContext } from '../../hooks/useTableContext';

  export default defineComponent({
    name: 'RedoSetting',
    components: {
      RedoOutlined,
      Tooltip,
    },
    setup() {
      const table = useTableContext();

      function redo() {
        table.reload();
      }

      return { redo, t };
    },
  });
</script>
